/*
 * @Author: Ken.Tseng
 * @EMail: ken.zeng@innomactech.com
 * @Date: 2020-12-23 17:34:21
 * @LastEditors: Ken.Tseng
 * @LastEditTime: 2021-02-02 14:09:44
 * @FilePath: \tencent_x5_demo_flutter\tencent_x5_demo_flutter\assets\mp.js
 */
// 调用APP方法
function postMsg(msg) {
  mpService.postMessage(JSON.stringify(msg));
}

var mp = {
  navigateTo(params) {
    postMsg({
      func: "navigateTo",
      data: params,
    });
  },
  navigateBack(params) {
    postMsg({
      func: "navigateBack",
      data: params,
    });
  },
  redirectTo(params) {
    postMsg({
      func: "redirectTo",
      data: params,
    });
  },
  reLaunch(params) {
    postMsg({
      func: "reLaunch",
      data: params,
    });
  },
};
